package com.jinly.ryder.manage.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.jinly.ryder.common.dao.entity.BaseDO;
import com.jinly.ryder.manage.service.model.DatabaseType;
import com.jinly.ryder.manage.service.model.EnvType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据库实例
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("database_instance")
public class DatabaseInstanceDO extends BaseDO {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 数据库名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 数据库类型
     */
    @TableField(value = "type")
    private DatabaseType type;

    /**
     * 应用名称
     */
    @TableField(value = "app_name", updateStrategy = FieldStrategy.NEVER)
    private String appName;

    /**
     * 环境类型
     */
    @TableField(value = "env_type")
    private EnvType envType;

    /**
     * 主机
     */
    @TableField(value = "host")
    private String host;

    /**
     * 端口
     */
    @TableField(value = "port")
    private Integer port;
}
